<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">
		<meta charset="utf-8" />
		<title>校园招聘</title>
	</head>
	<body>
		<nav class="navbar-inverse visible-lg visible-md" role="navigation" id="navbar-header-first">
			<div class="container">
				<div class="navbar-header">
					<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#example-navbar-collapse">
						<span class="sr-only">切换导航</span>
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
					</button>
					<a class="navbar-brand" href="#">校园招聘</a>
				</div>
				<div class="collapse navbar-collapse" id="example-navbar-collapse">
					<ul class="nav navbar-nav">
						<li class="active">
							<a href="#">首页</a>
						</li>
						<li class="dropdown">
							<a href="" class="dropdown-toggle" data-toggle="dropdown">职位列表<strong class="caret"></strong></a>
							<ul class="dropdown-menu">
								<li>
									<a href="show/showposition">企业职位列表</a>
								</li>
								<li>
									<a href="show/showinfo">求职列表</a>
								</li>
							</ul>
						</li>
						<!-- 用户未登录情况下 -->
						<c:if test="${user==null }" var="flag" scope="session">
							<li class="dropdown">
								<a href="#" class="dropdown-toggle" data-toggle="dropdown">求职者点我<strong class="caret"></strong></a>
								<ul class="dropdown-menu">
									<li>
										<a href="login.jsp">发布求职信息</a>
									</li>
									<li>
										<a href="login.jsp">我的求职信息</a>
									</li>
									<li>
										<a href="login.jsp">我的简历</a>
									</li>
								</ul>
							</li>

							<li class="dropdown">
								<a href="#" class="dropdown-toggle" data-toggle="dropdown">企业用户点我<strong class="caret"></strong></a>
								<ul class="dropdown-menu">
									<li>
										<a href="login.jsp">发布招聘信息</a>
									</li>
									<li>
										<a href="login.jsp">招聘信息管理</a>
									</li>
									<li>
										<a href="login.jsp">企业信息管理</a>
									</li>
									<li>
										<a href="login.jsp">应聘人员查看</a>
									</li>
								</ul>
							</li>
						</c:if>
						<!-- 用户已经登录情况下 -->
						<c:if test="${not flag}">
							<!--登录的是求职者 -->
							<c:if test="${user.status==0 }" var="flag" scope="session">
								<li class="dropdown">
									<a href="#" class="dropdown-toggle" data-toggle="dropdown">求职者点我<strong class="caret"></strong></a>
									<ul class="dropdown-menu">
										<li>
											<a href="person/findposition.jsp">发布求职信息</a>
										</li>
										<li>
											<a href="show/showmyinfo?pId=${user.id}">我的求职信息</a>
										</li>
										<li>
											<a href="person/myinfo.jsp">我的简历</a>
										</li>
									</ul>
								</li>
							</c:if>
							<!--登录的是企业者 -->
							<c:if test="${user.status==1 }" var="flag" scope="session">
								<li class="dropdown">
									<a href="#" class="dropdown-toggle" data-toggle="dropdown">企业用户点我<strong class="caret"></strong></a>
									<ul class="dropdown-menu">
										<li>
											<a href="company/pubposition.jsp">发布招聘信息</a>
										</li>
										<li>
											<a href="show/showmyposition?cId=${user.id}"">招聘信息管理</a>
										</li>
										<li>
											<a href="company/companyinfo.jsp">企业信息管理</a>
										</li>
										<li>
											<a href="show/showpersonposition?cId=${user.id }">应聘人员查看</a>
										</li>
									</ul>
								</li>
							</c:if>
						</c:if>
						<li class="">
							<a href="#">知名企业</a>
						</li>
						<li class="">
							<a href="#">联系我们</a>
						</li>
					</ul>
					<!--右边-->


					<ul class="nav navbar-nav navbar-right">
						<c:if test="${user==null }" var="flag" scope="session">
							<li>
								<a href="#" style="padding-right: 0px;">
									<button type="button" class="btn btn-default btn-xs">
										<span class="glyphicon glyphicon-user"></span>
									</button>
								</a>
							</li>
							<li>
								<a href="login.jsp" style="float: left;padding-right: 8px;padding-left: 5px;">登录</a>
								<span style="float: left;padding-top: 13px;">|</span>
								<a href="register.jsp" style="float: left; padding-left: 8px;">注册</a>
							</li>
						</c:if>

						<c:if test="${not flag}">
							<li class="dropdown">
								<c:choose>
									<c:when test="${user.status == 0}">
										<a href="#" class="dropdown-toggle" data-toggle="dropdown">${user.name} <strong class="caret"></strong></a>
										<ul class="dropdown-menu">
											<li>
												<a href="person/resetpassword.jsp">修改密码</a>
											</li>
											<li>
												<a href="person/myinfo.jsp">我的简历</a>
											</li>
									</c:when>
									<c:when test="${user.status == 1}">
										<a href="#" class="dropdown-toggle" data-toggle="dropdown">${user.name} <strong class="caret"></strong></a>
										<ul class="dropdown-menu">
											<li>
												<a href="company/resetpassword.jsp">修改密码</a>


											</li>
											<li>
												<a href="company/companyinfo.jsp">公司信息</a>
											</li>
									</c:when>
								</c:choose>


							<li class="divider">
							</li>
							<li>
								<a href="person/logout">退出</a>
							</li>
					</ul>
					</li>
					</c:if>
					</ul>
				</div>
			</div>
		</nav>





	</body>
</html>
